//
//  NetRequestLimiter.h
//  KidReading
//
//  Created by YangShuai on 17/2/15.
//  Copyright © 2017年 刘赞黄Telen. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef enum : NSUInteger{
    OneCycleLimitedPage_None = 0,
    OneCycleLimitedPage_HomePage = 1,
    OneCycleLimitedPage_Library = 2,
    OneCycleLimitedPage_SpecialLibrary = 3,
}OneCycleLimitedPage;

@interface NetRequestLimiter : NSObject

+ (NetRequestLimiter*)defaultLimiter;

/** 获取是否还在原来的生命周期内 */
-(BOOL)isOneLifeCycleLimitedWithLimitedPage:(OneCycleLimitedPage)limitedPage;
/** 获取首页或者书库数据成功后,更新限制 */
-(void)updateOneLifeCycleLimitedWithLimitedPage:(OneCycleLimitedPage)limitedPage;
/** 清除上一个生命周期标识 */
-(void)cleanOneLifeCycleLimitedWithLimitedPage:(OneCycleLimitedPage)limitedPage;
-(void)cleanAllOneLifeCycleLimited;

/** 获取是否存在一天的限制 */
-(BOOL)isOneDayLimitedWithCacheTimestamp:(NSTimeInterval)cacheTimestamp;

@end
